Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tenant): 修复多租户定时任务执行结果为空时的异常 #193

Closed
wants to merge 1 commit into from

Conversation

huangmingsir
Copy link

  • 针对执行结果为 null 的情况增加了日志记录
  • 为了避免 ConcurrentHashMap put空指针异常,将 result 设置为空字符串

- 针对执行结果为 null 的情况增加了日志记录
- 为了避免 ConcurrentHashMap put空指针异常,将 result 设置为空字符串
@YunaiV
Copy link
Owner

YunaiV commented Dec 1, 2024

                results.put(tenantId, StrUtil.toStringOrEmpty(result));

这个,已经修复了呀。

@huangmingsir
Copy link
Author

public static String toStringOrNull(Object obj) {
	return null == obj ? null : obj.toString();
}

这个方法当传入null,返回的还是null,会导致results.put异常。

@YunaiV
Copy link
Owner

YunaiV commented Dec 3, 2024

最新是 results.put(tenantId, StrUtil.toStringOrEmpty(result));
这个哈。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants